<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>随机排列数组中的元素</title>
</head>

<body>
</body>
<script>
  "use strict"; {
    var my_list = [1, 2, 3, 4, 5, 6, 7, 8, 9];
    console.table(my_list.sort(() => {
      return Math.random() - 0.5;
    }));
  };
</script>

</html>